package com.zhongke.cotrun.model.pojo;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.zhongke.cotrun.model.validator.UserValidator;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import javax.validation.constraints.Email;
import javax.validation.constraints.NotNull;
import java.io.Serializable;
import java.util.Date;

@Data
@ApiModel(value = "CompanyInfo",description = "机构基本信息表单")
public class CompanyInfo implements Serializable {

    @NotNull(message = "id不能为空", groups = {UserValidator.UpDate.class})
    @ApiModelProperty(value = "id号（修改时必填）", example = "1")
    private Long companyId;

    @ApiModelProperty(value = "关联用户账户", example = "12")
    private Long linkUserId;

    @ApiModelProperty(value = "公司名称", example = "中科淮北产业技术研究院",required = true)
    @NotNull(message = "公司名称不能为空", groups = {UserValidator.UpDate.class, UserValidator.InSet.class})
    private String companyName;

    @ApiModelProperty(value = "单位信用代码", example = "123456")
    private String companyCode;

    @ApiModelProperty(value = "省份id", example = "413",required = true)
    private Integer province;

    @ApiModelProperty(value = "城市id", example = "29",required = true)
    private Integer city;

    @ApiModelProperty(value = "公司邮箱", example = "1@1.com",required = true)
    @Email(message = "邮箱格式不正确", groups = {UserValidator.UpDate.class, UserValidator.InSet.class})
    private String companyEmail;

    @ApiModelProperty(value = "公司简介",required = true)
    @NotNull(message = "公司简介不能为空", groups = {UserValidator.UpDate.class, UserValidator.InSet.class})
    private String companyProviders;

    @ApiModelProperty(value = "机构类型",required = true)
    @NotNull(message = "机构类型不能为空", groups = {UserValidator.UpDate.class, UserValidator.InSet.class})
    private String companyType;

    @ApiModelProperty(value = "营业执照地址")
    private String businessLicense;

    @ApiModelProperty(value = "公司logo地址")
    private String companyLogo;

    @ApiModelProperty(value = "创建时间")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    private Date createTime;

    @ApiModelProperty(value = "最后更新时间")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    private Date updateTime;

    @ApiModelProperty(value = "审核时间")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    private Date auditTime;

    @ApiModelProperty(value = "审核状态 0:待审核,1:审核通过,2审核驳回",example = "0")
    private Integer auditStatus;

    @ApiModelProperty(value = "审核人员")
    private String auditUser;

    @ApiModelProperty(value = "审批意见")
    private String auditOpinion;

    @ApiModelProperty(value = "删除标记 0:正常,1:删除",example = "0")
    private Integer delFlag;

    @ApiModelProperty(value = "备注信息")
    private String remarks;
}
